package com.bnz.manager.client;

import com.bnz.manager.client.impl.UserFallBackImpl;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(name = "bnz-user",fallback = UserFallBackImpl.class/*fallbackFactory = MyUserFallBackImpl.class*/)
@ResponseBody
public interface UserClient {

    /**
     * 5. 根据用户名查询用户
     * @param username
     * @return
     */
    @GetMapping("/user/findByName/{username}")
    AjaxResult findByName(@PathVariable("username") String username);

}
